﻿#pragma once

#include "CoreMinimal.h"

#include "AttributeSet.h"
#include "AbilitySystemComponent.h"
#include "BoukenAttributeSet.generated.h"

// Uses macros from AttributeSet.h
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
	GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
	GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \
	GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName) \
	GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName)

UCLASS()
class BOUKEN_API UBoukenAttributeSet : public UAttributeSet
{
	GENERATED_BODY()

public:
	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set", meta = (HideFromLevelInfos))
	FGameplayAttributeData Damage;

	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set", meta = (HideFromLevelInfos))
	FGameplayAttributeData Healing;

	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set")
	FGameplayAttributeData MeleeRange = 200.0f;
	ATTRIBUTE_ACCESSORS(UBoukenAttributeSet, MeleeRange)

	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set")
	FGameplayAttributeData PickupRange = 200.0f;
	ATTRIBUTE_ACCESSORS(UBoukenAttributeSet, PickupRange)
	
	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set")
	FGameplayAttributeData Health;
	ATTRIBUTE_ACCESSORS(UBoukenAttributeSet, Health)

	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set")
	FGameplayAttributeData MaxHealth;
	ATTRIBUTE_ACCESSORS(UBoukenAttributeSet, MaxHealth)

	UPROPERTY(BlueprintReadOnly, Category = "Attribute Set")
	FGameplayAttributeData Gold;
	ATTRIBUTE_ACCESSORS(UBoukenAttributeSet, Gold)
	
	virtual void PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data) override;
};
